home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / tpb4_src.zip / TPB.PAS < prev    next >
Pascal/Delphi Source File  |  1988-09-13  |  5KB  |  131 lines

  1. (*****************************************************************************)
  2. (*                                                                           *)
  3. (*              TPBoard - A Turbo Pascal Bulletin Board System               *)
  4. (*                                                                           *)
  5. (*                        Copyright (c) 1987,88 by                           *)
  6. (*                      Jon Schneider & Rick Petersen                        *)
  7. (*                                                                           *)
  8. (*                    Portions Copyright (c) 1986,87 by                      *)
  9. (*                       Steve Fox & Les Archambault                         *)
  10. (*                                                                           *)
  11. (*                     All commercial rights reserved.                       *)
  12. (*                                                                           *)
  13. (*                                                                           *)
  14. (*    This program is based on Les Archambault's PICS, which in turn was     *)
  15. (*    based on ROS Vers 3.4 by Steve Fox. It is NOT public domain. You       *)
  16. (*    are not allowed to use any of it's code in any commercial product.     *)
  17. (*                                                                           *)
  18. (*    The code uses portions of the 'Turbo Professional' library. It         *)
  19. (*    will not compile without it. It also uses 'Overlay Manager', but       *)
  20. (*    you can compile without it as long as you remove 'Overmgr' from        *)
  21. (*    the 'Uses' statement in TPBMain. If you don't use the Overlay          *)
  22. (*    Manager, you may not be able to 'Type' from within Archives.           *)
  23. (*                                                                           *)
  24. (*    This program also uses the Database Toolbox from Borland. You MUST     *)
  25. (*    have it before compiling, as it uses B+Trees for the users record.     *)
  26. (*                                                                           *)
  27. (*    Additional thanks to:                                                  *)
  28. (*                                                                           *)
  29. (*    Chuck Forsberg - for his splendid protocol engine, DSZ.                *)
  30. (*    Darrell Pittman - for his Quotes package.                              *)
  31. (*    Bob Hartman - for his excellent FidoNet programs.                      *)
  32. (*    Ted Lassagne - for his EXDATE unit.                                    *)
  33. (*    Tim Kokkonen - for his Turbo Pascal tools, both commercial and PD.     *)
  34. (*                                                                           *)
  35. (*****************************************************************************)
  36.  
  37. {For update & modification history see the file TPB-UPD.HIS.}
  38.  
  39.  
  40. {$R-}                             {Range checking off}
  41. {$B-}                             {Boolean complete evaluation off}
  42. {$S-}                             {Stack checking off}
  43. {$I+}                             {I/O checking on}
  44. {$N-}                             {No numeric coprocessor}
  45. {$M $4000, $4000, $A0000}
  46.  
  47.  
  48. program TPBoard;
  49.  
  50.  
  51. Uses
  52.   TPCrt, Globals, Core1, Core2, Utilmnu1,
  53.   FileMnu1, MsgEntr, Sysop4, Initial1,
  54.   Initial2, Loginout, TPBMain;
  55.   
  56.   
  57. begin                             { TPBoard }
  58.   CheckBreak := False;
  59.   num_params := ParamCount;
  60.   cmd_tail := num_params > 0;
  61.   System_Init;
  62.   cold_start;
  63.   setup;
  64.   wait_for_user;
  65.   check_300_restrict;
  66.   while not fini do
  67.     begin
  68.       login;
  69.       if Online and in_use then
  70.         set_initial_areas;
  71.       while Online and in_use do
  72.         begin
  73.           WriteLn(Com);
  74.           if op_chat then
  75.             op_chat := chat;
  76.           check_time;
  77.           Make_Prompt;
  78.           Write_status_line;
  79.           WriteLn(Com);
  80.           st := prompt(st, 70, 'ES?M');
  81.           if Length(st) >= 1 then
  82.             ch := st[1]
  83.           else
  84.             ch := ' ';
  85.           if (not op_chat) then
  86.             begin
  87.               case mode of
  88.                 message_mode :
  89.                   process_messages;
  90.                 files_mode :
  91.                   process_files;
  92.                 utility_mode :
  93.                   process_utility;
  94.                 sysop_mode :
  95.                   process_sysop;
  96.               end;
  97.             end;
  98.           if online and (not in_use) and (not macro_in_progress) then
  99.             begin
  100.               WriteLn(Com);
  101.               in_use := (not ask('Terminate this call', 'Y'));
  102.             end;
  103.         end;                      {online and in use}
  104.       if in_library or in_arc then
  105.         ArcLbr;
  106.       if audit_on then
  107.         toggle_audit;
  108.       if (user_rec.fn <> 'SYSOP') and Online then
  109.         begin
  110.           if not valid_pw then
  111.             mesg_enter('S')
  112.           else if ask('Do you have a message for the sysop', 'N') then
  113.             mesg_enter('S');
  114.         end;
  115.       wrapup;
  116.       if cmd_tail then
  117.         begin
  118.           System_De_Init;
  119.           ClrScr;
  120.           Halt
  121.         end;
  122.       setup;
  123.       wait_for_user;
  124.       check_300_restrict;
  125.     end;
  126.   System_De_Init;
  127.   ClrScr;
  128. end.                              { of TPB.PAS }
  129.  
  130. 
  131.